import request from '@/utils/request';

// 获取模板分类
export function getTemplateCategoryApi(data) {
  return request({
    url: '/users/legal/contract_template_categories',
    method: 'get',
    data,
  });
}
// 获取模板列表
export function getTemplateListApi(data) {
  return request({
    url: '/users/legal/contract_templates',
    method: 'get',
    data,
  });
}
// 获取模板详情
export function getTemplateDetailApi(id) {
  return request({
    url: `/users/legal/contract_templates/${id}`,
    method: 'get',
  });
}
// 下载模板
export function downloadTemplateApi(id) {
  return request({
    url: `/users/legal/contract_templates/${id}/download`,
    method: 'get',
    responseType: 'blob',
  });
}
// 热搜词
export function getHotSearchApi() {
  return request({
    url: '/users/legal/contract_templates/hot_search_term',
    method: 'get',
  });
}
